package com.h6.crm.util.pojo;

public enum ResultCode {

    /* 成功状态码 */
    SUCCESS(20000, "成功"),
    /* 参数错误 */
    PARAM_IS_INVALID(10001, "参数无效"),
    PARAM_IS_BLANK(10002, "参数为空"),
    PARAM_TYPE_BIND_ERROR(10003, "参数类型错误"),
    PARAM_NOT_COMPLETE(10004, "参数缺失"),
    PARAM_NOT_COMPLETE2(10002, "请求头参数缺失"),
    /* 数据错误 */
    DATA_NOT_EXISTS(30001, "数据不存在"),
    /* 附件上传失败 */
    ATTACHMENT_UPLOAD_FAILD(30002, "附件上传失败，请稍后再试"),
    ATTACHMENT_DOWNLOAD_FAILD(30003, "附件下载失败，请稍后再试"),
    ATTACHMENT_NOT_NAME(30004, "上传附件没有名字，请检查"),
    /* 登陆账号异常 */
    ACCOUNT_NOT_EXISTS(40001, "账号不存在，请检查"),
    /* 服务器错误 */
    SYSTEM_ERROR(100000, "系统异常，请稍后重试");

    private Integer code;
    private String message;

    private ResultCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer code() {
        return this.code;
    }

    public String message() {
        return this.message;
    }
}
